Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocation Change Flow #330

Merged
merged 17 commits into from
Dec 22, 2021

Conversation

brisco17
Copy link
Contributor

@brisco17 brisco17 commented Oct 29, 2021

Resolves issue #294. This extends the Allocation system by allowing project PIs and Managers to request changes to project allocations and their attributes.

Allocations and Allocation Attribute Types now have an "is_changeable" field that system admins can use to denote whether or not they want users to be able to request changes to those objects. If an Allocation is changeable, a user can request a date extension to that allocation. If an Allocation Attribute is changeable, users can request its value to be updated.

To request changes, a PI should go to an Allocation's Detail Page and press the "Request Change" button in the "Allocation Information" table header which will take them to the "Change Request" page. This page takes the user's desired changes plus a justification for those changes to make an AllocationChangeRequest object (along with AllocationAttributeChangeRequest objects for every Allocation Attribute that has had a change requested, and a AllocationChangeStatusChoice object to denote the change's status). The form also validates user requested Allocation Attribute values.

Users can keep track of their Allocation change requests on a new "Allocation Change Requests" table on the Allocation's Detail page, which shows the date the change was requested, the change's status, any notes left by admins, and a link to a more detailed view of the request ("Allocation Change Detail" page).

Admins can review change requests by selecting the 'Allocation Change Requests' link in the Admin tab of the navbar. The page is structured similarly to the 'Allocation Requests' page and Admins are given the option to either Approve/Deny changes on the spot, or enter their "Allocation Change Detail" pages where they can also leave notes for users.

Users are notified by email when their changes are approved or denied, and once a change is activated the Allocation/Allocation Attributes are updated immediately.

…en checked this property allows a 'request change' button to appear next to the corresponding attribute on its Allocation Detail page. This button will be used to link the user to a new form which will allow them to request changes to be made to the attribute (form still in progress).
… will be used to allow PI's to request an extension on an allocation's End Date if checked in the admin portal. The 'Request Change' button on an Allocation Detail page has now been moved to the top of the page (and only one will appear for all desired changes). Fixed routing issue for the 'Request Allocation Attribute Change' form. Form in progress
… the 'is_changable' field is explicitly added (not having this was causing issues for existing ColdFront installations)
…risco17/coldfront into ubccr#294-change-allocation-attributes
@aebruno aebruno requested a review from dsajdak November 2, 2021 14:57
@dsajdak
Copy link
Contributor

dsajdak commented Nov 2, 2021

On testing found:

  1. The 'Request Change' button is available for all allocations whether they're marked 'is changeable' or not. I think this should be displayed only if the allocation is changeable or if the default to make all allocations changeable is set.
  2. A PI can request a change on an expired allocation which they shouldn't be able to do. If the allocation is locked an error is displayed and the PI can not request the change, which is what we want for expired allocations too.
  3. Marked an allocation 'is changeable' and logged in as the PI on that allocation. Clicked 'Request Change,' selected '60 days' from the date extension drop down and entered a justification. When I clicked 'submit' I saw this error:
    error
    NOTE: this happens whether I change the date or modify an attribute. I also tried doing this as an admin and get the same error.

…'Allocation Detail' page now only appears if the allocation's 'is_changeable' field is set to true. A user can also only access the 'Allocation Change' form if the allocation has an acceptable status (almost everything besides 'Expired')
…de whether or not to allow allocation change requests by default and to customize the list of days users can request allocation extensions
…Form data is missing or has been tampered with'). Also balanced form tag in allocation_change.html to fix invalid HTML error
…nstances, can get the allocation change status choices loaded into their application automatically
…l page template to include the new 'is changeable' field
…ion change list format, fixing the 'Request Change' button functionality on the 'Allocation Detail' template, and updating who can see the 'is changeable' field on the 'Allocation Detail' Template
… post notes when a change is approved/denied
@dsajdak
Copy link
Contributor

dsajdak commented Dec 7, 2021

All issues previously reported have been resolved. Work flow looks good and all testing passed. One final task is to make the allocation attribute changes editable by the admin. They should be able to approve some but not all changes. Add a garbage can icon to the allocation attribute table. If the admin does not approve of the change request they can either modify the value or delete it entirely. Add a modal for 'Are you sure you want to delete?'

For the date extension, add a '0 days' or 'No extension' option to the drop down for admins to select and then no change is made to the end date of the allocation.

Copy link
Contributor

@dsajdak dsajdak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All testing passed and this new allocation change process is complete. Great contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants